package Test_319_3;

public class Circle extends Shape{
    double r;//半径

    @Override
    public double gerArea() {
        area = 3.14*r*r;
        return area;
    }

    @Override
    public double getPer() {
        per = 2*3.14*r;
        return per;
    }

    @Override
    public void showAll() {

        System.out.println("圆的半径："+r);
        System.out.println("圆的颜色："+getColor());
        System.out.println("圆的面积："+gerArea());
        System.out.println("圆的周长："+getPer());

    }

    public Circle(){
        System.out.println("Circle类默认构造方法");
    }

    public Circle(String color,double r){
        super(color);
        this.r = r;
        System.out.println("Circle类自定义构造方法");
    }
}
